package com.xms.security.data;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xms.security.entity.RoleEntityPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 * RoleEntityPermissionMapper
 * </p>
 *
 * @author migo
 * @since 2021/9/6
 */
public interface RoleEntityPermissionMapper extends BaseMapper<RoleEntityPermission> {
    RoleEntityPermission getUserPermission(@Param("entityname") String entityName, @Param("userid") UUID userid, @Param("access") int access);

    List<RoleEntityPermission> getUserPermissions(@Param("entityname") String entityName, @Param("userid") UUID userid);

    List<RoleEntityPermission> getRolePermissions(@Param("entityids") List<UUID> entityIds, @Param("roleids") List<UUID> roleIds, @Param("access") int access);
}
